package com.gc.services.impl;

import com.gc.dao.custom.EntrustMapper;
import com.gc.dto.EntrustDTO;
import com.gc.pojo.SysEntrust;
import com.gc.services.EntrustService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EntrustServiceImpl implements EntrustService {

    @Autowired
    private EntrustMapper entrustMapper;

    @Override
    public int addEntrust(SysEntrust entrust) {
        return entrustMapper.insertSelective(entrust);
    }

    @Override
    public List<SysEntrust> getAll() {
        return entrustMapper.selectAll();
    }

    @Override
    public List<EntrustDTO> getAllDTO() {
        return entrustMapper.selectAllDTO();
    }

}
